package com.lagou.bak;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class StreamMySqlRun {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<Students> data = env.fromElements(new Students("lucas", 18), new Students("jack", 30));

        data.addSink(new SinkToMySql());
        env.execute();
    }
}
